﻿using System.Collections;
using UnityEngine;

public class FireBullet : MonoBehaviour
{
    public WeaponFire weapon;

    public Vector3 vt;

    private void Update()
    {
        transform.position = transform.position + 10 * vt * Time.deltaTime;
    }
    public void OnTriggerEnter(Collider other)
    {
        RoleController role = other.GetComponent<RoleController>();
        if (role != null)
        {
            weapon.Hit(other);
            Destroy(gameObject);
        }
    }
}
